<?php
/* ------------------------------------------------------------------------
  # WAMP Co., Ltd - WEB 2.0 DEVELOPMENT
  # Website: http://wampvn.com
  ------------------------------------------------------------------------- */
// no direct access
defined('_JEXEC') or die('Restricted access');
include_once (dirname(__FILE__) . DS . 'wp_tool.php');
$document = & JFactory::getDocument();
$document->setMetaData('generator', 'http://wampvn.com');

if (preg_match('/(?i)msie [1-7]/', $_SERVER['HTTP_USER_AGENT'])) {
    echo '<div align="center">Chúng tôi không hỗ trợ IE6, vung lòng sử dụng trình duyệt <a href="http://www.mozilla.com/vi/firefox/">Firefox</a>, <a href="http://www.google.com/chrome/intl/en/make/download.html?brand=CHKZ">Chrome</a> hoặc nâng cấp lên IE8, IE9</div>';
} else {
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"	xml:lang="<?php echo $this->language; ?>"	lang="<?php echo $this->language; ?>">
        <head>
            <?php if(JRequest::getVar('view') == 'listarticle'): ?>
                <script type="text/javascript" src="<?php echo $tmpl_path; ?>js/jquery-1.4.4.js"></script>
            <?php else: ?>
                <script type="text/javascript" src="<?php echo $tmpl_path; ?>js/jquery.js"></script>
            <?php endif; ?>
            <jdoc:include type="head" />
            
            <?php JHTML::_('behavior.mootools'); ?>
            <script language="javascript" type="text/javascript">
                var wp_root     = '<?php echo JURI::base(); ?>';
                var wp_path_tpl = '<?php echo $tmpl_path; ?>';
    	
            </script>

            <!-- CSS -->
            <link rel="stylesheet" href="<?php echo $tmpl_sys_path;?>css/system.css" type="text/css" />
            <link rel="stylesheet"	href="<?php echo $tmpl_sys_path;?>css/general.css" type="text/css" />
            <link rel="stylesheet" type="text/css"	href="<?php echo $tmpl_path; ?>style/reset.css" />
            <link rel="stylesheet" type="text/css"	href="<?php echo $tmpl_path; ?>style/960.css" />
            <link rel="stylesheet" type="text/css"	href="<?php echo $tmpl_path; ?>style/style.css" />
            <script type="text/javascript"	src="<?php echo $tmpl_path; ?>js/jquery.colorbox.js"></script>
            <script type="text/javascript"	src="<?php echo $tmpl_path; ?>js/jquery.jcarousel.js"></script>
            <script type="text/javascript" src="<?php echo $tmpl_path;?>js/jquery.easing.min.js"></script>
            <script type="text/javascript" src="<?php echo $tmpl_path;?>js/imageflow.js"   ></script>
            <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>
            
            <!-- Cufon -->
            <script type="text/javascript" src="<?php echo $tmpl_path; ?>js/cufon-yui.js"></script>
            <script type="text/javascript" src="<?php echo $tmpl_path; ?>js/topa.font.js"></script>
            
            <!-- Menu -->
            <script type="text/javascript" src="<?php echo $tmpl_path; ?>js/hoverIntent.js"></script>
            <script type="text/javascript" src="<?php echo $tmpl_path; ?>js/superfish.js"></script>
            
            <script type="text/javascript">
                Cufon.replace('h1, h2, .componentheading, p.car-title,  span.khung_anh_title span',{hover:true});
            </script>


            <!--[if IE ]>
               
               <style type="text/css">
               
               </style>
           <![endif]-->

            <!--[if IE 7]>
                <style type="text/css">
                      
                </style>
            <![endif]-->
            <!--[if  IE 6]>

                            <script type="text/javascript" src="<?php echo $tmpl_path;?>js/ie_png.js"></script>
                            <script type="text/javascript">
                                    ie_png.fix('.png');
                            </script>
              <![endif]-->

            <!-- END: CSS -->
            
            <script type="text/javascript">
                jQuery(document).ready(function() {
                  
                  
                    jQuery('.top-slider')
                    .cycle({
                        //pager:  '#nav',
                        //timeout: 1000,
                        //speed: 1000,

                        fx:     'fade',
                        next:   '#top-slider-next',
                        prev:   '#top-slider-prev'
                    });
                    jQuery("a[rel='igallery1']").colorbox();
                    //Lavalamp plugin
                    //First replace .active to .current
                    //jQuery(".current").addClass('currents').removeClass('active');
                    //Call lavalamp
                    
                    jQuery('#mycarousel-up').jCarouselLite({
                        btnNext: ".next",
                        btnPrev: ".prev",
                        visible: 1,
                        vertical: true
                    });
                    
                    
                                

                    
              }); // END inital
            </script>

        </head>
        <body>
            <div class="top_bg png">
                <div class="bottom_bg png">
                    <div class="wp_wrapper png">
                        <div class="wp_header container_16 png">
                            <div class="header_wrap">
                                <div class="logo grid_14">
                                    <?php if( $this->countModules('flash_banner')) { ?>
                                            <jdoc:include type="modules" name="flash_banner" style="raw" /> 
                                    <?php } ?>
                                </div>
                                
                                <div class="lang">
                                    <?php if( $this->countModules('language')) { ?>
                                            <jdoc:include type="modules" name="language" style="raw" /> 
                                    <?php } ?>
                                </div><!-- end lang -->
                                <div class="clearfix"></div>
                                <div class="main_menu <?php if($this->language == 'vi-vn'){  echo 'vi';} else { echo 'en';} ?>">
                                    <?php if( $this->countModules('menutop')) { ?>
                                            <jdoc:include type="modules" name="menutop" style="raw" /> 
                                    <?php } ?>
                                </div><!-- # main_menu -->
                            </div><!-- #header_wrap -->
                        </div><!-- # wp_header -->

                        <div class="wp_content">
                            
                            
                            
                                
                                <?php if(JRequest::getVar('view')!='frontpage'): ?>
                            
                                    
                                    <?php if( $this->countModules('breadcrumbs')) {  ?>
                                        <div class="mod_topcontent container_16">
                                            <div class="pathWay breadcrumbs png">
                                                    <jdoc:include type="modules" name="breadcrumbs" style="raw" />
                                            </div>
                                        </div>
                                     <?php } ?>
                            
                                    <!-- slide show -->
                                    <?php if( $this->countModules('slideshow')) { ?>
                                    <div class="slider_wrapper container_16">
                                            <jdoc:include type="modules" name="slideshow" style="raw" />
                                    </div> 
                                    <?php } ?>

                                <?php endif; ?>
                                    
                               
                            
                            <!-- Message -->
                            <?php if ($this->getBuffer('message')) : ?>
                            <div class="error container_16">
                                    <jdoc:include type="message" />
                            </div>
                            <?php endif; ?>
                            
                            <!-- Show home page -->
                                <?php if(JRequest::getVar('view') == 'frontpage'): ?>
                                    <div class="home_warp container_16 ">
                                        <div class="intro_home">
                                            <div class="left grid_9">
                                            
                                                <jdoc:include type="modules" name="flash_intro_home" style="raw"/> 
                                            
                                            </div><!-- end left -->
                                            <div class="right grid_6">

                                                <jdoc:include type="modules" name="detail_intro_home" style="intro_home" /> 

                                            </div><!-- end right -->
                                            <div class="clearfix"></div>
                                        </div><!-- end intro_home -->
                                        <!-- module customer-->
                                                <?php if($this->countModules('sale_info')): ?>
                                                    <jdoc:include type="modules" name="sale_info" style="modSaleInfo" />
                                                <?php endif; ?>

                                        <div class="home_news container_16">
                                            <div class="home_news_wrap">
                                                <jdoc:include type="modules" name="home_news" style="raw" />
                                            </div><!-- end home_news_wrap -->
                                        </div><!-- end home_news -->
                                    </div><!-- end content wrap -->
                                <?php elseif(JRequest::getVar('view')  == 'wrapper'): ?>
                                    <div class="investor_relation_wrap">
                                        <jdoc:include type="component" />
                                    </div>
                                <?php else: ?>
                                    <!-- order page ex: Giới thiệu, Liên hệ -->
                                    
                                    <?php
                                        $sizeclass = '';
                                        $have_sidebar = false;
                                        if($this->countModules('new_pro') || $this->countModules('doitac') || $this->countModules('video') || $this->countModules('mod_about') || $this->countModules('slide_catalog')){
                                            $have_sidebar = true;
                                            $sizeclass="two_column";

                                        }else{
                                            $have_sidebar = false;
                                            $sizeclass="container_16";
                                        }

                                    ?>
                                   
                                        <?php if($have_sidebar): ?>
                                            <div class="about_us_wrap container_16 sidebar_shadow"><div class="round_top"><div class="round_bottom"><div class="component_content">
                                        <?php else: ?>
                                            <div class="about_us_wrap no_shadow container_16"><div class="product_round_top"></div><div class="content_product">
                                        <?php endif; ?>
                                                
                                                
                                                    <div class="main_content <?php echo $sizeclass; ?>" >
                                                        <!-- Ho tro ban hang -->
                                                        <?php if($this->countModules('hotro_lienhe')): ?>
                                                            <jdoc:include type="modules" name="hotro_lienhe" /> 
                                                            <div class="clearfix h_40"></div>
                                                        <?php endif; ?>


                                                        <jdoc:include type="component" />
                                                    </div>
                                                    <?php if($have_sidebar): ?>
                                                        <div class="sidebar">

                                                            <!-- about link -->
                                                            <?php if( $this->countModules('mod_about')) {  ?>
                                                                    <div class="block right_mod_linhvuc">
                                                                            <jdoc:include type="modules" name="mod_about" style="modRight" />
                                                                    </div><!-- #right_mod_linhvuc-->
                                                            <?php } ?>

                                                            <!-- video sidebar -->
                                                            <?php if( $this->countModules('video')) {  ?>
                                                                    <div class="block right_mod_video">
                                                                            <jdoc:include type="modules" name="video" style="modRight" />
                                                                    </div><!-- End #right_mod_video -->
                                                            <?php } ?>
                                                            
                                                             <!-- Catalog -->
                                                            <?php if( $this->countModules('slide_catalog')) {  ?>
                                                                    <div class="block slide_catalog">
                                                                            <jdoc:include type="modules" name="slide_catalog" style="modRight" />
                                                                    </div><!-- End #rb-content-->
                                                            <?php } ?>

                                                            <!-- New product -->
                                                            <?php if( $this->countModules('new_pro')) {  ?>
                                                                    <div class="block right_mod_newsproduct">
                                                                            <jdoc:include type="modules" name="new_pro" style="modRight" />
                                                                    </div><!-- End #rb-content-->
                                                            <?php } ?>

                                                            <!-- Partners -->
                                                            <?php if( $this->countModules('doitac')) {  ?>
                                                                    <div class="block right_mod_our_partners">
                                                                            <jdoc:include type="modules" name="doitac" style="modRight" />
                                                                    </div><!-- End #rb-content-->
                                                            <?php } ?>
                                                                    
                                                           
                                                        </div><!-- end sidebar -->
                                                    <?php endif; ?>
                                                    <div class="clearfix h30"></div>
                                                
                                           <?php if($have_sidebar): ?>
                                                 </div><!-- component_content --></div></div></div><!-- #bg border -->                                    
                                           <?php else: ?>
                                                 </div><!-- component_content --><div class="product_round_bottom"></div><!-- end #about_us_wrap -->
                                           <?php endif; ?>
                                <?php endif; ?>
                            <!--Them div-->
                        </div><!-- end wp_content -->
                        <div class="wp_footer container_16 png">
                            <div class="footer_wrap">
                                <!-- footer -->
                                <jdoc:include type="modules" name="footer" style="footer_detail" /> 
                                <div class="clearfix">&nbsp;</div>
                            </div><!-- end footer_wrap-->
                            <div class="line_separate"></div>
                            <div class="copyright">
                                Copyright ©2010 HungVuongPanga.com. All rights reserved.
                            </div><!-- end copyright-->
                        </div><!-- end wp_footer -->
                    </div><!-- end wp_wrapper -->
                </div><!-- end bottom_bg -->
            </div><!-- end top_bg -->
        </body>

    </html>
<?php } ?>